/**
 * Generate code from /{{projectName}}-core/src/main/java/{{packageName}}/{{apis}}/dto/{{apiDtos@DEFAULT}}.java.hbs
 */
package cn.ibizlab.api.dto;

import java.util.*;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.*;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * oauth客户端信息[OauthClientDetailsDTO]
 *
 * @author generator
 */
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
@ApiModel("oauth客户端信息DTO")
public class OauthClientDetailsDTO extends DTOBase implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @JsonProperty("client_id")
    @JSONField(name = "client_id")
    @ApiModelProperty(value = "标识", position = 0)
    private String clientId;

    /**
     * 名称
     */
    @JsonProperty("client_name")
    @JSONField(name = "client_name")
    @ApiModelProperty(value = "名称", position = 1)
    private String clientName;

    /**
     * 资源id集合
     */
    @JsonProperty("resource_ids")
    @JSONField(name = "resource_ids")
    @ApiModelProperty(value = "资源id集合", position = 2)
    private String resourceIds;

    /**
     * 访问密钥
     */
    @JsonProperty("client_secret")
    @JSONField(name = "client_secret")
    @ApiModelProperty(value = "访问密钥", position = 3)
    private String clientSecret;

    /**
     * 权限范围
     */
    @JsonProperty("scope")
    @JSONField(name = "scope")
    @ApiModelProperty(value = "权限范围", position = 4)
    private String scope;

    /**
     * 支持的授权类型
     */
    @JsonProperty("authorized_grant_types")
    @JSONField(name = "authorized_grant_types")
    @ApiModelProperty(value = "支持的授权类型", position = 5)
    private String authorizedGrantTypes;

    /**
     * 客户端重定向URI
     */
    @JsonProperty("web_server_redirect_uri")
    @JSONField(name = "web_server_redirect_uri")
    @ApiModelProperty(value = "客户端重定向URI", position = 6)
    private String webServerRedirectUri;

    /**
     * authorities
     */
    @JsonProperty("authorities")
    @JSONField(name = "authorities")
    @ApiModelProperty(value = "authorities", position = 7)
    private String authorities;

    /**
     * access_token_validity
     */
    @JsonProperty("access_token_validity")
    @JSONField(name = "access_token_validity")
    @ApiModelProperty(value = "access_token_validity", position = 8)
    private Integer accessTokenValidity;

    /**
     * refresh_token_validity
     */
    @JsonProperty("refresh_token_validity")
    @JSONField(name = "refresh_token_validity")
    @ApiModelProperty(value = "refresh_token_validity", position = 9)
    private Integer refreshTokenValidity;

    /**
     * 其他信息
     */
    @JsonProperty("additional_information")
    @JSONField(name = "additional_information")
    @ApiModelProperty(value = "其他信息", position = 10)
    private String additionalInformation;

    /**
     * 自动批准授予权限
     */
    @JsonProperty("autoapprove")
    @JSONField(name = "autoapprove")
    @ApiModelProperty(value = "自动批准授予权限", position = 11)
    private String autoapprove;

    /**
     * 创建时间
     */
    @JsonProperty("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    @JSONField(name = "create_time" , format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", position = 12)
    private Date createTime;

    /**
     * DC
     */
    @JsonProperty("dc")
    @JSONField(name = "dc")
    @ApiModelProperty(value = "DC", position = 13)
    private String dc;


    /**
     * 设置 [名称]
     */
    public OauthClientDetailsDTO setClientName(String clientName) {
        this.clientName = clientName;
        this.modify("client_name", clientName);
        return this;
    }

    /**
     * 设置 [资源id集合]
     */
    public OauthClientDetailsDTO setResourceIds(String resourceIds) {
        this.resourceIds = resourceIds;
        this.modify("resource_ids", resourceIds);
        return this;
    }

    /**
     * 设置 [访问密钥]
     */
    public OauthClientDetailsDTO setClientSecret(String clientSecret) {
        this.clientSecret = clientSecret;
        this.modify("client_secret", clientSecret);
        return this;
    }

    /**
     * 设置 [权限范围]
     */
    public OauthClientDetailsDTO setScope(String scope) {
        this.scope = scope;
        this.modify("scope", scope);
        return this;
    }

    /**
     * 设置 [支持的授权类型]
     */
    public OauthClientDetailsDTO setAuthorizedGrantTypes(String authorizedGrantTypes) {
        this.authorizedGrantTypes = authorizedGrantTypes;
        this.modify("authorized_grant_types", authorizedGrantTypes);
        return this;
    }

    /**
     * 设置 [客户端重定向URI]
     */
    public OauthClientDetailsDTO setWebServerRedirectUri(String webServerRedirectUri) {
        this.webServerRedirectUri = webServerRedirectUri;
        this.modify("web_server_redirect_uri", webServerRedirectUri);
        return this;
    }

    /**
     * 设置 [authorities]
     */
    public OauthClientDetailsDTO setAuthorities(String authorities) {
        this.authorities = authorities;
        this.modify("authorities", authorities);
        return this;
    }

    /**
     * 设置 [access_token_validity]
     */
    public OauthClientDetailsDTO setAccessTokenValidity(Integer accessTokenValidity) {
        this.accessTokenValidity = accessTokenValidity;
        this.modify("access_token_validity", accessTokenValidity);
        return this;
    }

    /**
     * 设置 [refresh_token_validity]
     */
    public OauthClientDetailsDTO setRefreshTokenValidity(Integer refreshTokenValidity) {
        this.refreshTokenValidity = refreshTokenValidity;
        this.modify("refresh_token_validity", refreshTokenValidity);
        return this;
    }

    /**
     * 设置 [其他信息]
     */
    public OauthClientDetailsDTO setAdditionalInformation(String additionalInformation) {
        this.additionalInformation = additionalInformation;
        this.modify("additional_information", additionalInformation);
        return this;
    }

    /**
     * 设置 [自动批准授予权限]
     */
    public OauthClientDetailsDTO setAutoapprove(String autoapprove) {
        this.autoapprove = autoapprove;
        this.modify("autoapprove", autoapprove);
        return this;
    }

    /**
     * 设置 [DC]
     */
    public OauthClientDetailsDTO setDc(String dc) {
        this.dc = dc;
        this.modify("dc", dc);
        return this;
    }


}
